import {get,getParam} from './http'
//判断是线上还是测试，然后判断是否需要跨域
let isOnline = false;
let newsUrl = "/enterprise/selectAll";
let productsUrl = "/enterprise/selectProductSolution";
let footinfosUrl = "/enterprise/manage/systemSetting/findSystemSetting";
let bannerUrl = "/enterprise/manage/indexImg/findIndexImg";
let newsDetial = '/getNewsDetial'
let about = '/enterprise/selectAbout'
let zizhi = '/enterprise/manage/zizhi/findZizhi'
let kehu = '/enterprise/manage/kehu/findKehu'
let success = '/enterprise/success/findSuccess'
let pageNews = '/enterprise/pageNews'
if(!isOnline){
    newsUrl = '/getNews';
    productsUrl = '/getProducts';
    footinfosUrl = '/getFootinfo';
    bannerUrl = '/getBannerinfo';
    newsDetial = '/getNewsDetial';
    about = '/getAbout';
    zizhi = '/getZizhi';
    kehu = '/getKehu';
    success = '/getSuccess';
    pageNews = '/getPageNews'
}
//获取新闻列表
export const getNewsList = () => get(newsUrl)
//获取产品列表
export const getProductList = () => get(productsUrl)
//获取界面底部信息
export const getFootInfo = () => get(footinfosUrl);
//获取Banner图
export const getBannerinfo = () => get(bannerUrl);
//获取新闻详情
export const getNewsDetial= (param) => getParam(newsDetial,param);
//获取关于我们
export const getAbout= () => get(about);
//获取公司资质轮播图
export const getZizhi= () => get(zizhi);
//获取服务客户轮播图
export const getKehu= () => get(kehu);
//获取成功案例轮播图
export const getSuccess= () => get(success);
//获取新闻分页（pageNum,pageSize,type--新闻类型）
export const getPageNews= (param) => get(pageNews,param);

